unit frmAbrirCaixaUnt;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ComCtrls, StdCtrls, Buttons;

type
  TfrmAbrirCaixa = class(TForm)
    Label1: TLabel;
    Edit1: TEdit;
    Edit2: TEdit;
    Label2: TLabel;
    Edit3: TEdit;
    Label3: TLabel;
    DateTimePicker1: TDateTimePicker;
    Data: TLabel;
    Edit4: TEdit;
    Label4: TLabel;
    BitBtn4: TBitBtn;
    BitBtn1: TBitBtn;
    procedure BitBtn1Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  frmAbrirCaixa: TfrmAbrirCaixa;

implementation

uses frmAbrirCaixaProcFuncUnt, DMDadosUnt;

{$R *.dfm}

procedure TfrmAbrirCaixa.BitBtn1Click(Sender: TObject);
begin
  frmAbrirCaixaProcFunc := TfrmAbrirCaixaProcFunc.Create(Application);
  frmAbrirCaixaProcFunc.Show;
end;

procedure TfrmAbrirCaixa.FormCreate(Sender: TObject);
begin
  DateTimePicker1.Date := Now;
  with DMDados do
    begin
      cdsControle.Close;
      cdsControle.Params[0].AsString := 'ID_CAIXA';
      cdsControle.Open;
      Edit2.Text := IntToStr(cdsControleVALOR.AsInteger);
      cdsControle.Close;
    end;
end;

end.
